package ltd.hxya.novel.user.vo;

import lombok.Data;
import ltd.hxya.novel.common.valid.SaveOperate;
import ltd.hxya.novel.common.valid.UpdateOperate;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class UserVo {
    @Pattern(regexp = "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$" ,groups = {UpdateOperate.class,SaveOperate.class},message = "请输入正确的手机号")
    private String username;

    @NotBlank(groups = {UpdateOperate.class, SaveOperate.class},message = "密码不能为空")
    private String password;
}

